<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class AddFlightRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            //'passenger_birthday'=>'required',
            'flight_dates'=>'required',
            'flight_nos'=>'required',
            'fly_time1'=>'required',
            'start_airport1'=>'required',
            'end_airport1'=>'required',
        ];
    }

    public function attributes()
    {
        return [
            'passenger_birthday'=>'生日',
            'flight_dates'=>'航班日期',
            'flight_nos'=>'航班号',
            'fly_time1'=>'起飞时间',
            'start_airport1'=>'起飞机场',
            'end_airport1'=>'降落机场',
        ];
    }
}
